Update TestContainers and change docker depenency to moby#1513
Conversation
|
Can someone please advise on this failing integration test? Also looks like I need to upgrade the linter with associated new linter requirements. Will seek to do that in a separate PR. UPDATE: I created #1515 to keep the golang update (with linter and related code cleanup) as a separate PR for clean git commits and limit the "blast radius" of my change. So I think this PR will depend on that one (I will rebase once 1515 is merged) if that makes sense. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR updates the project’s Go and container-testing dependencies to address a Docker-related CVE risk by moving TestContainers usage away from github.com/docker/docker and onto Moby libraries, and adapts affected tests accordingly.
Changes:
- Bumped module Go version to
1.25.0and refreshed a number of dependencies (notablytestcontainers-go). - Removed direct dependency on
github.com/docker/dockerand introducedgithub.com/moby/moby/apifor container/network types. - Updated
consumer_zero_queue_test.goto use Moby’s network/port binding types.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
pulsar/consumer_zero_queue_test.go |
Switches port binding setup from Docker/nat types to Moby network types for TestContainers usage. |
go.mod |
Updates Go version and dependency set (TestContainers bump; Docker -> Moby API). |
go.sum |
Synchronizes module checksums with the updated dependency graph. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The issue with TestSendBufferRetainWhenConnectionStuck is a data race in the mockConn.WriteData() method. The test's assert.Eventually is reading from conn.buffers without holding the lock, while the producer goroutine is writing to it with the lock. The fix is to protect both the write and the read with the mutex. |
Motivation
Update dependencies - esp for docker dependency that has this CVE https://nvd.nist.gov/vuln/detail/CVE-2026-34040
Modifications
consumer_zero_queue_test.goto use new moby dependenciesVerifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation